import java.util.Random;
class Producer extends Thread{
	private IntBuffer buffer;
	Random r;
	public Producer(IntBuffer buffer){
		this.buffer = buffer;
		r = new Random();
	}
	
	public void run(){
		while(true){
			int num = r.nextInt(6);
			buffer.add(num);
			System.out.println("+Produced "+num);
		}
	}
	
}